package zero.tech.games.phz.data;

import java.util.HashMap;
import java.util.Map;

import zero.tech.games.logic.common.RoomCache;
import zero.tech.games.phz.data.entity.SetcardsPanel;

public class PhzRoomCache extends RoomCache{
	private Map<Integer,Integer> total_score=new HashMap<>();//总积分
	private SetcardsPanel setcardsPanel=new SetcardsPanel();//设置面板
	private Map<Integer,Integer> hupai_times=new HashMap<>();//胡牌次数
	private Map<Integer,Integer> zimo_times=new HashMap<>();//自摸次数
	private Map<Integer,Integer> dianpao_times=new HashMap<>();//点炮次数
	private Map<Integer,Integer> tipai_times=new HashMap<>();//提牌次数
	public PhzRoomCache(String room_id) {
		super(room_id);
	}
	public SetcardsPanel getSetcardsPanel() {
		return setcardsPanel;
	}
	public void setSetcardsPanel(SetcardsPanel setcardsPanel) {
		this.setcardsPanel = setcardsPanel;
	}
	public Map<Integer, Integer> getTotal_score() {
		return total_score;
	}
	public void setTotal_score(Map<Integer, Integer> total_score) {
		this.total_score = total_score;
	}
	public Map<Integer, Integer> getHupai_times() {
		return hupai_times;
	}
	public void setHupai_times(Map<Integer, Integer> hupai_times) {
		this.hupai_times = hupai_times;
	}
	public Map<Integer, Integer> getZimo_times() {
		return zimo_times;
	}
	public void setZimo_times(Map<Integer, Integer> zimo_times) {
		this.zimo_times = zimo_times;
	}
	public Map<Integer, Integer> getDianpao_times() {
		return dianpao_times;
	}
	public void setDianpao_times(Map<Integer, Integer> dianpao_times) {
		this.dianpao_times = dianpao_times;
	}
	public Map<Integer, Integer> getTipai_times() {
		return tipai_times;
	}
	public void setTipai_times(Map<Integer, Integer> tipai_times) {
		this.tipai_times = tipai_times;
	}
	public void hupai_times_inc(int uid) {
		if(!hupai_times.containsKey(uid)) {
			hupai_times.put(uid, 1);
		}else {
			int old=hupai_times.get(uid);
			hupai_times.put(uid, old+1);
		}
	}
	public void zimo_times_inc(int uid) {
		if(!zimo_times.containsKey(uid)) {
			zimo_times.put(uid, 1);
		}else {
			int old=zimo_times.get(uid);
			zimo_times.put(uid, old+1);
		}		
	}
	public void dianpao_times_inc(int uid) {
		if(!dianpao_times.containsKey(uid)) {
			dianpao_times.put(uid, 1);
		}else {
			int old=dianpao_times.get(uid);
			dianpao_times.put(uid, old+1);
		}	
	}
	public void tipai_times_inc(int uid) {
		if(!tipai_times.containsKey(uid)) {
			tipai_times.put(uid, 1);
		}else {
			int old=tipai_times.get(uid);
			tipai_times.put(uid, old+1);
		}		
	}

}
